<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/common/taglib.jsp"%>
<%@ include file="/WEB-INF/common/header.jsp"%>

<div class="layui-fluid">

	<form class="layui-form" isLoad="${empty bean ? 0 : 1}">
	  
	<c:if test="${not empty bean }">
	  <div class="layui-form-item">
	    <label class="layui-form-label">主键：</label>
	    <div class="layui-input-block">
	    	<div class="layui-form-mid layui-word-aux">${bean.id }</div>
	      	<input type="hidden" name="id" />
	    </div>
	  </div>
	  
	  <hr>
	</c:if>
	  
	  <div class="layui-form-item">
	    <label class="layui-form-label">发信地址：</label>
	    <div class="layui-input-block">
	    	<input type="text" name="accountName" required lay-verType="tips" lay-verify="email" placeholder="阿里云邮箱配置的发信地址" autocomplete="off" class="layui-input" />
	    </div>
	  </div>
	  
	  <hr>
	  
	  <div class="layui-form-item">
	    <label class="layui-form-label">发信昵称：</label>
	    <div class="layui-input-block">
	    	<input type="text" name="fromAlias" required lay-verType="tips" lay-verify="required" placeholder="请输入发信人昵称,长度小于 15 个字符" autocomplete="off" class="layui-input" maxlength="15" />
	    </div>
	  </div>
	  
	  <hr>
	  
	  <div class="layui-form-item">
	    <label class="layui-form-label">控台标签：</label>
	    <div class="layui-input-block">
	    	<input type="text" name="tagName" placeholder="可输入控制台创建的标签，长度为1-50个字符，允许英文字母、数字" autocomplete="off" class="layui-input" maxlength="50" />
	    </div>
	  </div>
	  
	  <hr>
	  
	  <div class="layui-form-item">
	    <label class="layui-form-label">邮件主题：</label>
	    <div class="layui-input-block">
	    	<input type="text" name="subject" required lay-verType="tips" lay-verify="required" placeholder="请输入邮件主题" autocomplete="off" class="layui-input" />
	    </div>
	  </div>
	  
	  <hr>
	  
	  <div class="layui-form-item">
	    <label class="layui-form-label">模版内容：</label>
	    <div class="layui-input-block">
			<textarea name="htmlBody" required lay-verType="tips" lay-verify="required" placeholder="请输入模板内容描述" class="layui-textarea"></textarea>
	    </div>
	  </div>
	  
	  <hr>
	  
	  <div class="layui-form-item">
	  	<label class="layui-form-label">模板通道：</label>
	    <div class="layui-input-inline">
	    	<select name="accessKeyId" class="fsSelect fsDict" isLoad="1" dict="mailConfigList" addNull="1" lay-verify="required"></select>
	    </div>
	    
	    <label class="layui-form-label">状态：</label>
	    <div class="layui-input-inline">
	      <c:choose>
    		<c:when test="${not empty bean }">
    			<input type="checkbox" name="status" lay-skin="switch" lay-text="启用|禁用" value="0" {{bean.status == 0 'checked' : ''}} />
    		</c:when>
    		<c:otherwise>
    			<input type="checkbox" name="status" lay-skin="switch" lay-text="启用|禁用" value="0" checked />
    		</c:otherwise>
	      </c:choose>
	    </div>
	  </div>
	  
	  <hr/>
	  
	  <div class="layui-form-item">
	    <label class="layui-form-label">描述说明：</label>
	    <div class="layui-input-block">
	    	<input type="text" name="notice" placeholder="（可以为空）请输入描述说明" autocomplete="off" class="layui-input" maxlength="100" />
	    </div>
	  </div>
	  
	  <hr>
	  
	  <div class="layui-form-item" style="text-align: center;">
	  	 <button class="layui-btn" lay-submit="" lay-filter="${empty bean ? 'save' : 'edit' }" url="${ctx }/mail/temp/add"><i class="layui-icon">&#xe642;</i>${empty bean ? '新增' : '编辑' }</button>
     	 <button type="button" class="layui-btn layui-btn-primary" function="close">关闭</button>
   	  </div>
  
	</form>
</div>

<%@ include file="/WEB-INF/common/bottom.jsp"%>